Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to crossterm-0.25 #3390

Merged
merged 1 commit into from
Aug 22, 2022
Merged

Conversation

groves
Copy link
Contributor

@groves groves commented Aug 11, 2022

I've got a couple PRs that depend on this update. I thought it'd be nice to get the library bump in separately to keep from conflating any issues.

@@ -271,6 +273,11 @@ impl From<crossterm::event::Event> for Event {
crossterm::event::Event::Key(key) => Self::Key(key.into()),
crossterm::event::Event::Mouse(mouse) => Self::Mouse(mouse.into()),
crossterm::event::Event::Resize(w, h) => Self::Resize(w, h),
crossterm::event::Event::FocusGained => Self::FocusGained,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focus events are emitted on Windows regardless of any flags being set in crossterm. Don't want to use unreachable like in the Paste arm as a result.

Comment on lines 335 to 336
kind: _,
state: _,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these can be discarded a bit more tersely with

crossterm::event::KeyEvent { code, modifiers, .. }

@archseer
Copy link
Member

Resolved the comment and added a note about the extra state now offered by crossterm

@archseer archseer merged commit 18909aa into helix-editor:master Aug 22, 2022
@groves groves deleted the update-crossterm-0.25 branch August 22, 2022 10:25
@sfarq
Copy link

sfarq commented Aug 22, 2022

I am using Kitty, does this update mean I can now use some variation of C-backspace = "delete_word_backward" and solve #1085 ?

@the-mikedavis
Copy link
Member

I see C-backspace being parsed correctly by crossterm with this update on kitty so it should work on kitty at least. I'm not knowledgable about what changed in crossterm in this update so I'm not sure the fix is expected to work on all terminal emulators.

@sfarq
Copy link

sfarq commented Aug 22, 2022

@the-mikedavis i have added:

[keys.insert]
C-backspace = "delete_word_backward"

and am running the latest Kitty and the latest Helix. It does not do anything, when I press ctrl-backspace it just deletes a character as it did before.

hx --version
helix 22.05 (18909aaf)

@groves
Copy link
Contributor Author

groves commented Aug 22, 2022

We might need to enable some of the keyboard enhancement flags to pick up on previously unsupported key combos. I haven't looked into what happens on other terms when emitting those flags, so I didn't want to just enable it here.

@David-Else
Copy link
Contributor

@groves Would you be able to add them? It would be much appreciated!

AlexanderBrevig pushed a commit to AlexanderBrevig/helix that referenced this pull request Aug 29, 2022
thomasskk pushed a commit to thomasskk/helix that referenced this pull request Sep 9, 2022
jdrst pushed a commit to jdrst/helix that referenced this pull request Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants